<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <input type="text" id="valss">
    <button id="Workers">开始计算</button>
    <div id="result"></div>
    <script>
      Workers.onmousedown=function () {
          var work=new Worker("demo03.js");
          work.postMessage(valss.value);
          work.onmessage=function (e) {
            result.innerHTML=e.data;
          }
        }
    </script>

</body>
</html>